package com.wuhan.tracedemo.log;


import com.wuhan.tracedemo.entity.LogInfo;
import com.wuhan.tracedemo.service.LogInfoService;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.SimpleDateFormat;
import java.util.Date;

public class BackLog {

    public LogInfo putLog(String userid, String desc, String interface_name) {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateString = formatter.format(date);
        LogInfo logInfo = new LogInfo(userid, dateString, desc, interface_name);
        return logInfo;
    }
}
